﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>

<sec:authentication property="principal" var="currentPrincipal"
	scope="page" />

<div class="modal-dialog ms-modal-dialog">
	<div class="modal-content">

		<div class="modal-header">
			<h4>
				<i class="glyphicon"></i>&nbsp;&nbsp;<span>车型组图片</span>
			</h4>
			<button type="button" class="close" data-dismiss="modal" style="margin-top: -30px;">
				<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
			</button>
		</div>

		<form class="form-horizontal ms-form form-personal-info" method="POST"
			action="${ctx.host}/model-groups/${modelGroup.id}/picture"
			data-validate="true">

			<input type="hidden" name="_method" value="PATCH"> <input
				type="hidden" id="cover" name="cover" value="">

			<div class="modal-body">

				<div class="form-group  ms-form-group">
					<div class="upload-cover"
						style="width: 250px; height: 200px; margin: 0 auto;">
						<button type="button" id="pickCover" class="edit-btn fade">
							<span class='glyphicon glyphicon-repeat' aria-hidden='true'></span>&nbsp;&nbsp;重新上传
						</button>
						<div id="coverPreviewList">
							<img id="coverPreview"
								src="${cloudContext.domain}/${modelGroup.picture}" />
						</div>
						<label id="messageCover" class="control-label messageCover hide"></label>
					</div>
				</div>
			</div>
				<div class="modal-footer ms-modal-footer">
					<button type="submit" class="btn ms-btn btn-primary">确定</button>
					<button type="button" class="btn ms-btn ms-btn-gary"
						data-dismiss="modal">取消</button>
				</div>
		</form>
	</div>
</div>